//*************************************************************************************
// EGTB Generator Common Definitions
//*************************************************************************************

#pragma once

#include "..\Engine\Common.h"

// colors of sides
#define BLACK 0
#define WHITE 1
#define CC 1

// database scores 
#define UNKNOWN 0
#define WIN 1
#define LOSS 2
#define DRAW 3

//------------------------------------------------------------------------
// macros

#define Pad16(x) (((x)/32+1)*32)
#define HiWord(x) (((x)&0xFFFF0000)>>16)
#define LoWord(x) ((x)&0xFFFF)

#include "..\Engine\Log.h" 
#include "..\Engine\Timer.h"

// functions
inline char* ResultToStr(int result)
{
	if(result == WIN)
		return "WIN";
	else if(result == DRAW)
		return "DRAW";
	else if(result == LOSS)
		return "LOSS";
	else
		return "UNKNOWN";
}

inline char* ColorToStr(int color)
{
	if(color == WHITE)
		return "WHITE";
	else if(color == BLACK)
		return "BLACK";
	else
		return "ERROR COLOR";
}